import request from '@/utils/request'

// 查询申请领用列表
export function listOccupation(query) {
  return request({
    url: '/labdanger/occupation/list',
    method: 'get',
    params: query
  })
}

// 查询申请领用详细
export function getOccupation(instanceId) {
  return request({
    url: '/labdanger/occupation/' + instanceId,
    method: 'get'
  })
}

// 新增申请领用
export function addOccupation(data) {
  return request({
    url: '/labdanger/occupation',
    method: 'post',
    data: data
  })
}

//submit
export function submitOccupation(data) {
  return request({
    url: '/labdanger/occupation/submit',
    method: 'post',
    data: data
  })
}

// 修改申请领用
export function updateOccupation(data) {
  return request({
    url: '/labdanger/occupation',
    method: 'put',
    data: data
  })
}

// 删除申请领用
export function delOccupation(applyOccupationId) {
  return request({
    url: '/labdanger/occupation/' + applyOccupationId,
    method: 'delete'
  })
}

// 导出申请领用
export function exportOccupation(query) {
  return request({
    url: '/labdanger/occupation/export',
    method: 'get',
    params: query
  })
}